package cn.webdai.activemq.listener;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Component;

/**
 * @author 戴金华
 * @date 2019-12-30 18:33
 */
@Component
public class MessageListener {

    @Autowired
    private JmsMessagingTemplate jmsMessagingTemplate;


    @JmsListener(destination = "activeMQQueue")
    public void getMessage(String message){
        System.out.println("接受到的消息是"+message);
    }
}
